<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 结构伪类选择器权重0010 */
        /* :nth-child() 是会把所有孩子按顺序编号，先看nth-child(n)，再看前面的标签 */
        /* 所以下列代码无意义 */
        section div:nth-child(1) {
            background-color: #f5f5f5;
        }

        /* :nth-of-type(n) 会把指定元素排好序号。先看前面的标签把该标签的孩子排序，再看nth-of-type(n) */
        section div:nth-of-type(1) {
            background-color: #ccc;
        }
    </style>
</head>
<body>
    <section>
        <p>光头强</p>
        <div>熊大</div>
        <div>熊二</div>
    </section>
</body>
</html>